using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using System.Threading;
using JigLibX.Physics;
using JigLibX.Collision;
using JigLibX.Geometry;
using Microsoft.Xna.Framework.Input.Touch;
using Services;
using Utilities;

namespace SpaceBattle.Logic.SampleLevel
{
  public struct BaseLevelStats
  {
    public int TotalScore;
    public int NumLivesRemaining;

    public int EnemyNukesHitWithLasers;
    public int EnemyShipsHitWithLasers;
    public int EnemyShipsHitWithNukes;
    public float SecondsToCompleteLevel;
    public int EnemyShipsDestroyed;
    public int LivesLost;
    public int Credits;

    public int LevelScore
    {
      get
      {
        return EnemyNukesHitWithLasers * BaseLevelStats.LASER_HIT_NUKE +
               EnemyShipsDestroyed * BaseLevelStats.ENEMY_DESTROYED +
               EnemyShipsHitWithLasers * BaseLevelStats.LASER_HIT_ENEMY +
               EnemyShipsHitWithNukes * BaseLevelStats.NUKE_HIT_ENEMY -
               LivesLost * BaseLevelStats.LIFE_LOST +
               (SecondsToCompleteLevel < 30.0f ? BaseLevelStats.TIMER_BONUS : 0);
      }
    }

    public static readonly int NUKE_HIT_ENEMY = 10;
    public static readonly int LASER_HIT_ENEMY = 2;
    public static readonly int LASER_HIT_NUKE = 20;
    public static readonly int ENEMY_DESTROYED = 15;
    public static readonly int LIFE_LOST = 5;
    public static readonly int TIMER_BONUS = 30;
  }
}